package com.dingwen.treasure.task.quartz.init;

import com.dingwen.treasure.task.quartz.manager.QuartzJobManager;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

/**
 * quartz 定时任务初始化
 *
 * @author dingwen
 * @date 2022/03/13
 */
@Configuration
public class QuartzJobInit implements CommandLineRunner {

    /**
     * 任务管理组件
     */
    @Resource
    private  QuartzJobManager quartzJobManager;

    @Override
    public void run(String... args) {
        quartzJobManager.init();
    }
}
